#include <iostream>
#include<queue>
#include<string>
using namespace std;

int main()
{
    int n=5,k=3, total = 0, sum = 0;
    int array[5] = { 2,4,16,10,11 };
    for (int i = 0; i < n; i++)
    {
        total += array[i];
    }
    priority_queue<int> pq;
    for (int i = 0; i < n;i++)
    {
        if(array[i]%2==0)
        pq.push(array[i]);
    }
    while (k--)
    {
        int tmp = pq.top() / 2;
        pq.pop();
        sum += tmp;
        if (tmp % 2 == 0)
            pq.push(tmp);  
    }
    cout << total - sum << endl;
    return 0;
}
